<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 3d效果，必须在将要做动画的元素的外层空间设置  perspective:100;    */
        div {
            width: 500px;
            height: 500px;
            border: 1px solid red;
            perspective: 500px;
            /*透视距离*/
        }

        p {
            width: 100px;
            height: 100px;
            background: blue;
            transition: 2s;
            margin: 200px;
        }

        div:hover p {
            /* translateZ 轴位移  正值感觉是放大 负值 感觉缩小 */
            /* transform: translateZ(-200px); */
            /* 位移的3D效果 */
            transform: translate3d(100px, 100px, 200px);
        }
    </style>
</head>

<body>
    <div>
        <p></p>
    </div>
</body>

</html>